<!DOCTYPE html>
<html>
<head>
    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?ca9f046e770c921a4fd9535af2bb011a"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    
    
    
    <link rel="canonical" href="true/weblog/">
    
    
    <title>Greg&#39;s Blog | 今天也要加油鸭.jpg</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="">
    <meta property="og:type" content="website">
<meta property="og:title" content="Greg&#39;s Blog">
<meta property="og:url" content="https://greg0566.gitee.io/weblog/index.html">
<meta property="og:site_name" content="Greg&#39;s Blog">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Greg&#39;s Blog">
    
        <link rel="alternate" type="application/atom+xml" title="Greg&#39;s Blog" href="/weblog/atom.xml">
    
    <link rel="shortcut icon" href="/weblog/duck.png">
    <link rel="stylesheet" href="/weblog/css/style.css?v=1.7.2">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/weblog/img/brand.jpg)">
      <div class="brand">
        <a href="/weblog/" class="avatar waves-effect waves-circle waves-light">
          <img src="/weblog/img/head.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">Greg Zhou</h5>
          <a href="mailto:zhourikai@imperial-vision.com" title="zhourikai@imperial-vision.com" class="mail">zhourikai@imperial-vision.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect active">
              <a href="/weblog/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/weblog/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                编年史
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/weblog/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/zhourikai2008" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://wuyukangkang.gitee.io/blog" target="_blank" >
                <i class="icon icon-lg icon-location-arrow"></i>
                友情链接 - 康康大神
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">Greg&#39;s Blog</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header index-header">

    <div class="container fade-scale">
        <h1 class="title">Greg&#39;s Blog</h1>
        <h5 class="subtitle">
            
                今天也要加油鸭.jpg
            
        </h5>
    </div>

    


</header>

<div class="container body-wrap">

    <ul class="post-list">
    
        <li class="post-list-item fade">
            <article id="post-test"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-09-30 00:28:15" datetime="2018-09-29T16:28:15.457Z"  itemprop="datePublished">2018-09-30</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/weblog/2018/09/30/test/">测试</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <p>简介</p>
    

        <a href="/weblog/2018/09/30/test/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/weblog/tags/test/">test</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-webSocket"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-09-30 00:09:11" datetime="2018-09-29T16:09:11.920Z"  itemprop="datePublished">2018-09-30</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/weblog/2018/09/30/webSocket/">node WebSocket通信</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <p>使用<strong>nodejs-websocket</strong>模块部署WebSocket Server；使用<strong>websocket</strong>模块部署WebSocket Client；WebSocket Client请求连接WebSocket Server，配置有心跳机制和重连机制，保证WebSocket长时间保持通信。</p>
    

        <a href="/weblog/2018/09/30/webSocket/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/weblog/tags/node-js/">node.js</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-ImageResizer"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-09-29 23:28:56" datetime="2018-09-29T15:28:56.186Z"  itemprop="datePublished">2018-09-29</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/weblog/2018/09/29/ImageResizer/">前端JS 图片压缩</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        <p>使用js原生上传图片，先将图片转为<strong>base64</strong>格式数据；然后初始化自定义对象<strong>ImageResizer</strong>，传入最大高宽、图片<strong>base64</strong>等参数；在<strong>ImageResizer</strong>中，先把图片对象写入到<strong>canvas</strong>中，然后根据最大高宽按原图片高宽比等比例缩小；最后返回缩小后的<strong>base64</strong>数据和<strong>canvas</strong>。</p>
    

        <a href="/weblog/2018/09/29/ImageResizer/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/weblog/tags/HTML/">HTML</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/weblog/tags/jQuery/">jQuery</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-cas_4.0_deploy"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2018-09-17 01:06:11" datetime="2018-09-16T17:06:11.640Z"  itemprop="datePublished">2018-09-17</time>

        


    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/weblog/2018/09/17/cas_4.0_deploy/">CAS Server 4.0 部署</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        
    

        <a href="/weblog/2018/09/17/cas_4.0_deploy/" class="post-more waves-effect waves-button">
            阅读全文…
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/weblog/tags/CAS/">CAS</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/weblog/tags/Java/">Java</a></li></ul>

    </div>
    
</article>

        </li>
    
    </ul>

    

</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/weblog/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>Greg Zhou &copy; 2018</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://greg0566.gitee.io/weblog/&title=Greg's Blog&pic=https://greg0566.gitee.io/weblog/img/head.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://greg0566.gitee.io/weblog/&title=Greg's Blog&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://greg0566.gitee.io/weblog/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=Greg's Blog&url=https://greg0566.gitee.io/weblog/&via=https://greg0566.gitee.io/weblog" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://greg0566.gitee.io/weblog/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/weblog/', SHARE: true, REWARD: false };


</script>

<script src="/weblog/js/main.min.js?v=1.7.2"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/weblog/js/search.min.js?v=1.7.2" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
